<html>
<head><meta charset="utf-8"><title>install target · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html">install target</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="215346066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346066">(Nov 02 2020 at 16:53)</a>:</h4>
<p>how does one install a target when compiling locally? i want to test wasm32 stuff</p>



<a name="215346400"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346400" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346400">(Nov 02 2020 at 16:55)</a>:</h4>
<p><code>rustup target add wasm32-unknown-unknown</code></p>



<a name="215346449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346449">(Nov 02 2020 at 16:55)</a>:</h4>
<p>i already have that, it doesn't seem to detect it</p>



<a name="215346504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346504">(Nov 02 2020 at 16:56)</a>:</h4>
<div class="message_inline_image"><a href="https://gc.gy/72041165.png"><img src="https://gc.gy/72041165.png"></a></div>



<a name="215346537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346537">(Nov 02 2020 at 16:56)</a>:</h4>
<p>Oh, you are compiled your own compiler.</p>



<a name="215346573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346573">(Nov 02 2020 at 16:56)</a>:</h4>
<p>Then you need to add it to the <code>target</code> array in <code>config.toml</code>.</p>



<a name="215346853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215346853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215346853">(Nov 02 2020 at 16:58)</a>:</h4>
<p>like this?</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[build]</span>
<span class="n">target</span> <span class="o">=</span> <span class="k">["wasm32-unknown-unknown"]</span>
</code></pre></div>



<a name="215347100"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215347100" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215347100">(Nov 02 2020 at 17:00)</a>:</h4>
<p>You should probably use</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[build]</span>
<span class="n">target</span> <span class="o">=</span> <span class="k">["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]</span>
</code></pre></div>



<a name="215365048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215365048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> devsnek <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215365048">(Nov 02 2020 at 19:17)</a>:</h4>
<p>does anyone know what's up with this? does something special need to be done for wasm32? <a href="https://gc.gy/72049662.png">https://gc.gy/72049662.png</a></p>
<div class="message_inline_image"><a href="https://gc.gy/72049662.png"><img src="https://gc.gy/72049662.png"></a></div>



<a name="215371199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/install%20target/near/215371199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/install.20target.html#215371199">(Nov 02 2020 at 20:05)</a>:</h4>
<p><span class="user-mention" data-user-id="219805">@devsnek</span> You have to set <code>lld = true</code> in <code>config.toml</code> to build wasm32-unknown-unknown.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>